package DynamicProgram.Basic;

/**
 * @ClassName DynamicProgram
 * @Description TODO
 * @Author lenovo
 * @Date 2023-07-03 11:22
 * @Version 1.0
 * @Comment Magic. Do not touch.
 * If this comment is removed. the program will blow up
 */
public class Fib {

    public int fib(int n) {
        if (n == 0) {
            return 0;
        }
        if (n == 1) {
            return 1;
        }
        return fib(n-1) + fib(n-2);
    }

    public static void main(String[] args) {
        Fib fib = new Fib();
        System.out.println(fib.fib(3));
    }
}